Migrating to V 9.0
In this section you will find information about how to port from v8 -> v9. This is a major version upgrade and requires a lot of changes to make your site work again.
Overview of V 9.0
In V 9.0 we have ripped out all the old APIs and replaced them with more modern and well-tailored ones. It also involves changing technologies and concepts that will briefly be described in this article
The bad news is that it will take a lot of effort porting your solution.
The good news is that we'll be there all the way and your investments will be tenfolds once you're done.
Where did the UCommerce.Api and UCommerce.Runtime go ?
Well. The APIs as you know them are no longer alive and well. They have been replaced as already mentioned. Some has been ported, but we have also taken the liberty of letting the things go we don't feel was working well.
Instead of finding the old APIs in the following namespaces:
- UCommerce.Api
- UCommerce.Runtime
You will find the equivalent APIs here:
- Ucommerce.Api.Catalog
- Ucommerce.Api.Order
Favor interfaces and Dependency Injection
In 2020 best practices has drastically changed since the old APIs was built. This means that we want to encourage the use of dependency injection containers even more. The old static accessors for the APIs has been removed for this purpose. This means that the APIs are now designed as interfaces that needs to be resolved from the dependency injection container. This can either be done directly in your Controllers or ApiControllers if you bridge our IoC container with MVC, or directly with the container:
UCommerce.Infrastructure.ObjectFactory.Instance.Resolve<T>();
Good bye Raven and SQL - hello Lucene.Net
In v8 and below the APIs were partly powered by SQL server and partly powered by RavenDB. This gave an odd feeling and use of the APIs as they seemed not unified and gave trouble with crossing APIs as they were using different input types.
In V9 the new APIs will never surface entities nor will they access SQL server. Instead the APIs are replaced with Lucene.Net. This sets some requirements which is that an indexing process is put in place to make sure the data is available. This process happens out of sync which means your edited data is available only when the process has finished.